package com.group6.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * @author 赵博文
 * @TableName nurse
 */
@TableName(value ="nurse")
@Data
public class Nurse implements Serializable {
    /**
     * 
     */
    @TableId(value = "EmployeeID", type = IdType.AUTO)
    private Integer employeeid;

    /**
     * 
     */
    @TableField(value = "Name")
    private String name;

    /**
     * 
     */
    @TableField(value = "DepartmentID")
    private Integer departmentid;

    /**
     * 
     */
    @TableField(value = "JobTitle")
    private String jobtitle;

    /**
     * 
     */
    @TableField(value = "ContactInfo")
    private String contactinfo;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Nurse other = (Nurse) that;
        return (this.getEmployeeid() == null ? other.getEmployeeid() == null : this.getEmployeeid().equals(other.getEmployeeid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDepartmentid() == null ? other.getDepartmentid() == null : this.getDepartmentid().equals(other.getDepartmentid()))
            && (this.getJobtitle() == null ? other.getJobtitle() == null : this.getJobtitle().equals(other.getJobtitle()))
            && (this.getContactinfo() == null ? other.getContactinfo() == null : this.getContactinfo().equals(other.getContactinfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEmployeeid() == null) ? 0 : getEmployeeid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDepartmentid() == null) ? 0 : getDepartmentid().hashCode());
        result = prime * result + ((getJobtitle() == null) ? 0 : getJobtitle().hashCode());
        result = prime * result + ((getContactinfo() == null) ? 0 : getContactinfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", employeeid=").append(employeeid);
        sb.append(", name=").append(name);
        sb.append(", departmentid=").append(departmentid);
        sb.append(", jobtitle=").append(jobtitle);
        sb.append(", contactinfo=").append(contactinfo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}